<!--#include file="inc/conn.asp" -->
<!--#include file="inc/Function.asp" -->
<!--#include file="inc/pageClass.asp"-->
<%
CheckAdmin()
If request("Action") = "Delqq" Then
Id = Trim(checkstr(request("Id")))
set rs=conn.execute("Delete  from WEB_adminlog where Id="&Id)
End If

txtSearch = Trim(checkstr(request("txtSearch")))

If txtSearch<>""  Then
	sqlstr =  " and user_id like '%"&txtSearch&"%' or Char_Name like '%"&txtSearch&"%' or admin like '%"&txtSearch&"%' or ip like '%"&txtSearch&"%' or WEB_adminlog like '%"&txtSearch&"%'"
End If

Select Case request("Logtype")
Case 1 
  sql="select *  from WEB_adminlog where Logtype=1  "&sqlstr&" order by id desc"
	strtitle="用户日志"
Case 2 
  sql="select *  from WEB_adminlog where Logtype=2  "&sqlstr&" order by id desc"
  	strtitle="角色日志"
Case 3 
  sql="select *  from WEB_adminlog where Logtype=3  "&sqlstr&" order by id desc"
  	strtitle="装备日志"
Case 4 
  sql="select *  from WEB_adminlog where Logtype=3  "&sqlstr&" order by id desc"
  	strtitle="交易日志"
Case else
  sql="select *  from WEB_adminlog  where 1=1  "&sqlstr&" order by id desc"
  	strtitle="所有日志"
End Select 

  Set Rs = Server.CreateObject("ADODB.Recordset")
  Rs.Open sql,Conn,1,1
  Set page = New PageClass
    page.rs=Rs					'直接传递rs对象，传递成功后会自动关闭。如需要开启，请注释掉分页类的第87行val.Close。
    page.PageSize=Mypagesize					'分页大小
    page.setCount=-1					'可选。设置数据总数。0：使用RecordCount，-1：使用Count（默认），其他正数：指定的数据总数。
    page.PageID="p"					'Request.QueryString中分页参数字符串
strtitle=ServerName&"-系统日志"
Call  head(strtitle)
If browser()="pc" Then Call  LeftMenu()
%>
  <!-- 右侧主体开始 -->
  <div class="page-content">
<%Call  mnav()%>	
<div class="weadmin-body">
 <div class="layui-card" >
<div class="layui-card-body">
<table width="99%" cellpadding="2" cellspacing="0">
  <tr>
    <td width="50%">

<form class="layui-form layui-col-space5" action="Log_List.asp" method="get">
                                <div class="layui-inline layui-show-xs-block"     style="1  font-size: 12px;">
                                    <input type="text" name="txtSearch"  placeholder="请输入关键字" autocomplete="off" class="layui-input">
                                </div>
								<div class="layui-inline layui-show-xs-block">
								<input type="checkbox" name="SearchType" title="精确" value="1">

                                    <button class="layui-btn layui-btn-normal layui-btn-sm"  lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i>搜索</button>
                                </div>
                            </form>

		
		</td>
    <td>
						<div style="float: right">
						<a href="Log_List.asp"><button type="button" class="layui-btn layui-btn-primary layui-btn-sm">所有日志</button></a>  &nbsp;
					   <a href="Log_List.asp?Logtype=1"><button type="button" class="layui-btn layui-btn-sm">用户</button></a> &nbsp;
						<a href="Log_List.asp?Logtype=2"><button type="button" class="layui-btn layui-btn-normal layui-btn-sm">角色</button> </a> &nbsp;
						<a href="Log_List.asp?Logtype=3"><button type="button" class="layui-btn layui-btn-warm layui-btn-sm">装备</button> </a> &nbsp;
						<a href="Log_List.asp?Logtype=4"><button type="button" class="layui-btn layui-btn-danger layui-btn-sm">交易</button> </a> 
						</div>
                        </div>
	</td>
  </tr>
</table>

                        </div>
                    </div>
					


                        <div class="layui-card-body layui-table-body layui-table-main" style="margin-top:-13px">
                            <table class="layui-table layui-form">
                                <thead>
                                  <tr>
								 <!-- <th style="min-width: 15px;    max-width: 20px;"> <input type="checkbox" name="like1[read]" lay-skin="primary"></th>-->
                                    <th style="width: 60px;height:30px" >管理员</th>
                                    <th style="width: 150px;">用户</th>
                                    <th style="width: 170px;">角色</th>
                                    <th style="width: 160px;">发生时间</th>
                                    <!--<th>IP地址</th>-->
                                    <th style="width: 30px;">操作</th>
                                    <th>备注</th>
									</tr>
                                </thead>
                                <tbody>
								       <%
									  If page.eof Or page.bof Then 
									 response.write "<TR><th>没有找到任何记录...</th></TR>"
									 Else
										
									 Do While Not page.EOF
									 %>
                                  <tr>
									<!--<th style="min-width: 5px;    max-width: 10px;"><input type="checkbox" name="like1[game]" lay-skin="primary" ></th>-->
                                    <th style="height:26px"><%=page("admin")%></th>
									  <th><a title="<%=page("user_id")%>" href="User_Edit.asp?user_no=<%=page("user_no")%>"><%=page("user_id")%></a></th>
                                    <th><a title="<%=page("character_no")%>"  onclick="xadmin.open('角色:<%=page("character_no")%>','Char_Edit.asp?character_no=<%=page("character_no")%>')" href="javascript:;"><%=page("char_name")%></a></th>
									 <th>
									<%
									   if page("datetime")<>"" then 
										  datetime=Replace(page("datetime"),"2020/","20-")
										  datetime=Replace(datetime,"2021/","21-")
										  datetime=Replace(datetime,"2022/","22-")
										  datetime=Replace(datetime,"2023/","23-")
										  datetime=Replace(datetime,"/","-")
										end If
									response.write datetime
									  %></th>
                                      <!--<th><th><%=page("ip")%></th>-->
                                    <th><%=page("Logtype")%></th>
                                    <th><%=page("note")%></th>
                                    
                                    
                                  </tr>
                                                                
<%
   page.MoveNext
	Loop
	End If 
		 %>
                                </tbody>
                            </table>
                        </div>


								<div class="page">
								<%
								If browser()="pc" Then
									Response.write page.Control(10,"{Ctrl} {State}")
								Else
									Response.write page.Control(5,"{Ctrl} {State}")
								End If
								%>
							 / 执行时间 <%=Int(FormatNumber((Timer() - TimerStart) * 1000, 3))%> ms
			</div>

		</div>
		</div>
  </div>
	<%Call  footer%>
</body>
</html>